﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MP.master" ValidateRequest="false" CodeFile="Viewer.aspx.cs"
    Inherits="WebService_Viewer" %>

<asp:Content ID="Content3" ContentPlaceHolderID="MP1" runat="Server">
    <div class="box">
    <link href="<%=ResolveClientUrl("~") %>/themes/skin-<%=GetTogether.Studio.Config.Original.Skin %>/dtree.css?v=<%=GetTogether.Studio.Config.Original.ScriptStyleVersion %>"
        rel="stylesheet" type="text/css" />
    <div id="xml-form" style="">
        <form method="post" target="_self" action="Viewer.aspx?type=<%=ViewType==ViewerType.XML?"text":"xml" %>">
        <textarea id="result-text-xml" name="result-text-xml" style="margin:0px;width: 100%; border:none; background-image: none;" cols="5" rows="5"><%=Content %></textarea>
        <div class="line-sub"></div>
        <div style="text-align: center; padding: 3px 0px 5px 0px;">
            <%if(ViewType== ViewerType.XML){ %>
            <input type="button" class="btn" onclick="ShowXml();" value="Show XML As Tree" />
            <input type="button" class="btn" onclick="FormatXml('result-text-xml');" value="Format XML" />
            <%} %>
            <%if(ViewType== ViewerType.XML){ %>
            <input type="submit" class="btn" value="Text Viewer" />
            <%}else{ %>
            <input type="submit" class="btn" value="XML Viewer" />
            <%} %>
             <input type="button" class="btn" onclick="ShareXml('<%=ViewType%>');" value="Share" />
        </div>
            </form>
    </div>
    <%if(ViewType== ViewerType.XML){ %>
    <div id="xml-viewer">
        <div class="comment-box">XML viewer loading,please wait...</div>
    </div>
    <%} %>
        </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ScriptPlaceHolder" runat="Server">
    <script type="text/javascript">var SerUrl = "<%=ResolveUrl("~") %>";</script>
    <script src="<%=ResolveClientUrl("~") %>js/jquery.js?v=<%=GetTogether.Studio.Config.Original.ScriptStyleVersion %>"
        type="text/javascript"></script>
    <script src="<%=ResolveClientUrl("~") %>js/jquery-ext.js?v=<%=GetTogether.Studio.Config.Original.ScriptStyleVersion %>"
        type="text/javascript"></script>
    <script src="<%=ResolveClientUrl("~") %>js/studio.js?v=<%=GetTogether.Studio.Config.Original.ScriptStyleVersion %>"
        type="text/javascript"></script>
    <script src="<%=ResolveClientUrl("~") %>js/dtree.js?v=<%=GetTogether.Studio.Config.Original.ScriptStyleVersion %>"
        type="text/javascript"></script>
    <script src="<%=ResolveClientUrl("~") %>js/viewer.js?v=<%=GetTogether.Studio.Config.Original.ScriptStyleVersion %>"
        type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        SerUrlValueStyle = SerUrl + 'themes/skin-<%=GetTogether.Studio.Config.Original.Skin %>/';
        SetupInit();
        var FVersion = '';
        var d = null;
        $().ready(function () {
            //$('body').css('background', 'none');
            EnhanceTextarea('result-text-xml');
            <%if(ViewType== ViewerType.XML){ %>
            ShowXml();<%}else{%>
            $('#result-text-xml').css('height', $(window).height() - 100);;
            <%}%>
        });
    </script>
</asp:Content>
